﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Shapes;
using HalconDisplayControl.Attributes;
using HalconDotNet;

namespace HalconDisplayControl.Shape
{
    public class Rectangle2Shape : IShape
    {
        [ParamName("phi")]
        public double Phi { get; set; } = 0;
        [ParamName("row")]
        public double Row { get; set; } = 150;
        [ParamName("column")]
        public double Column { get; set; } = 150;
        [ParamName("length1")]
        public double Length1 { get; set; } = 100;
        [ParamName("length2")]
        public double Length2 { get; set; } = 100;

        public void CreateDrawingObj(out HTuple drawId)
        {
            HOperatorSet.CreateDrawingObjectRectangle2(Row, Column,Phi, Length1, Length2, out drawId);
        }

        public void CreateShapeObj(out HObject shapeObj)
        {
            HOperatorSet.GenRectangle2(out shapeObj, Row, Column, Phi, Length1, Length2);
        }
    }
}
